<?php
//include('Test.php'); //这个是你下面实例化的类
// header("Content-type: text/html; charset=utf-8");
// $url='http://getdeviceinfo.haiyaxiyi.cn';
// $imei = '866673035753893';
// $company = 'youfang';
// $pssword = 'youfang';
// $timestamp = time();
// $ver = '2.0';

// $sign = md5($imei.$company.$pssword.$timestamp);
// //$urls = $url.'/fuleidealdata.ashx?IMEI='.$imei.'&company='.$company.'&pssword='.$pssword.'&timestamp='.$timestamp.'sign='.$sign.'&ver='.$ver;
// //print_r($urls);die;
// $html = file_get_contents($url.'/fuleidealdata.ashx?IMEI='.$imei.'&company='.$company.'&pssword='.$pssword.'&timestamp='.$timestamp.'sign='.$sign.'&ver='.$ver);  

// echo $html;  

include_once './Test.php';
$productKey = 'zJu5dp2h2vU';
//$deviceName = '865933031094853';
	
	//启动请求命令
	// $post_data1['topic'] = "/". $productKey ."/" . $deviceName ."/cmd";
	// $post_data1['value']      =  "G7q1/+D+03bvS+DVRn0mEw==";
	// $post_data1['cmd']        =  "06000C010060";
	// $post_data1['ts']         =  time();
$input = file_get_contents("php://input");
// $post = $_POST;

// print_r($input);die;
	$SmsDemo = new Tests();
	$data_qidong = $SmsDemo->queryDeviceTest($productKey);
	
	// if($data_qidong['Success'] == 1){
	// 	header('refresh:5;url=./biaozhunxi.php');
	// 	print('洗衣机正在重置，请稍等...');
	// }

print_r($data_qidong);die;

//zJu5dp2h2vU/865933031094853/cmd
/* $request = new Iot\CreateProductRequest();
$request->setProductKey("zJu5dp2h2vU");
$request->setMessageContent("3Jvi8MI1qhEsquX2+MQmuw=="); //hello world Base64 String.
$request->setTopicFullName("/zJu5dp2h2vU/865933031094853/cmd"); //消息发送到的Topic全名.
$response = $client->getAcsResponse($request);
print_r($response); */


//$response = $SmsDemo::pubTests('zJu5dp2h2vU',865933031094853);
//$response = $SmsDemo->pubTests('zJu5dp2h2vU',865933031094853);
